﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _008_子类的构造函数
{
    internal class DrivedClass:BaseClass
    {
        private int attack;
        public DrivedClass()
        {
            Console.WriteLine("DrivedClass");
        }
        public DrivedClass(int attack)
        {
            this.attack = attack;
        }

        public DrivedClass(int attack,int hp,int speed):base(hp,speed)//base中hp和speed传递给父类
        {
            this.attack=attack;
        }
    }
}
